<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>成绩录入</title>
        <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
		<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
		<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>

        <link rel="stylesheet" type="text/css" href="css/base.css">
        <style>
        	.content1 {
				width: 100%;
				padding: 0;
				margin: auto;
				float: right; 
				height: 100%;
			}
			.title {
				width: 100%;
				padding-left: 2%;
				margin: auto;
				float: right;
				font-size: medium;
				height: 60px;
				background-color: rgb(189, 215, 238);
				color: rgb(48, 84, 150);
				line-height: 60px;
			}  
			.center{
				width: 50%;
				margin-top: 150px;
				margin-left: 360px;	
			}
			.center-margin-top{
				margin-top: 10px;   
			}
			.radius{
				border-radius: 5px;
				border-color: #0a0a0a;
			}
		</style>
		<script th:inline="javascript">
			$(document).ready(function(){
				var examtype = [[${examtype}]];
				var stu_id = [[${stu_id}]];
				var gradeclass = [[${gradeclass}]];
				var stu_idclsshow = "." + gradeclass;
				$(stu_idclsshow).prop("hidden",false);
				$("#examtype").val(examtype);
				$("#examtypeselect").val(examtype);
				$("#stu_id").val(stu_id);
				$("#stu_idselect").val(stu_id);
				$("#gradeclass").val(gradeclass);

				$("#examtypeselect").bind("change",function(){
					var examtypeslt = $(this).find("option:selected").val();
					$("#examtype").val(examtypeslt);
				});

				$("#stu_idselect").bind("change",function(){
					var stu_idselect = $(this).find("option:selected").val();
					$("#stu_id").val(stu_idselect);
				});

				$("#gradeclass").bind("change",function(){
					var stu_idcls = $(this).find("option:selected").val();
					console.log(stu_idcls);
					var stu_idclsshow = "." + stu_idcls;
					console.log(stu_idclsshow);
					$("#stu_idselect").val("");
					$("#stu_id").val("");
					$(".stu_ids").prop("hidden",true);
					$(stu_idclsshow).prop("hidden",false);
				})
			})
		</script>
    </head>
    <body>
	<form method="POST">
        <div th:replace="base/base::baseheader"></div>
        <div class="row content">
            <div th:replace="base/base::basemenu"></div>
            <div class="mainview">
	            <div class= "content1">
	            	<div class="menutitle">
						<b style="font-size: 26px;margin-left: 30px;">成绩录入</b>
					</div>
					<div class="row" style="margin: 20px 50px;">
						<span style="color: rgb(53, 103, 197);font-size: 20px;font-weight:700;" th:text="${semester}"></span>
						<input type="hidden" id="getterm" name="getterm" th:value="${getterm}">
					</div>
					<div class= "center">
						<div class="row">
							<div class="col-md-2">
								考试科目:
							</div>
							<div class="col-md-4">
								<input id="subject" class="form-control" type="text" name="subject" th:value="${tch_course}" disabled>
							</div>
						</div>
						<div class="row center-margin-top">
							<div class="col-md-2">
								考试类别:
							</div>
							<div class="col-md-4">
								<input type="hidden" id="examtype" name="examtype" th:value="${exam_type}">
								<select id="examtypeselect" class="form-control dp_edit" th:disabled="${statue=='change'} ? 'display' : 'false'">
										<option value=""></option>
										<option value="期中">期中</option>
										<option value="期末">期末</option>
										<option value="单元">单元</option>
								</select>
							</div>					
						</div>
						<div class="row center-margin-top" th:hidden="${statue=='change'} ? 'hidden' : 'false'">
							<div class="col-md-2">
								班&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;级:
							</div>
							<div class="col-md-4">
								<select id="gradeclass" class="form-control dp_edit" name="gradeclass" th:disabled="${statue=='change'} ? 'display' : 'false'">
										<option value=""></option>
										<option class="classoptions" value="stu_id11">一年一班</option>
										<option class="classoptions" value="stu_id12">一年二班</option>
										<option class="classoptions" value="stu_id13">一年三班</option>
										<option class="classoptions" value="stu_id14">一年四班</option>
										<option class="classoptions" value="stu_id15">一年五班</option>
										<option class="classoptions" value="stu_id21">二年一班</option>
										<option class="classoptions" value="stu_id22">二年二班</option>
										<option class="classoptions" value="stu_id23">二年三班</option>
										<option class="classoptions" value="stu_id24">二年四班</option>
										<option class="classoptions" value="stu_id25">二年五班</option>
										<option class="classoptions" value="stu_id31">三年一班</option>
										<option class="classoptions" value="stu_id32">三年二班</option>
										<option class="classoptions" value="stu_id33">三年三班</option>
										<option class="classoptions" value="stu_id34">三年四班</option>
										<option class="classoptions" value="stu_id35">三年五班</option>
								</select>
							</div>					
						</div>
						<div class="row center-margin-top">
							<div class="col-md-2">
								学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:
							</div>
							<div class="col-md-4">
								<input type="hidden" id="stu_id" name="stu_id" th:value="${stu_id}">
								<select id="stu_idselect" class="form-control" th:disabled="${statue=='change'} ? 'display' : 'false'">
									<option value=""></option>
									<option class="stu_ids stu_id11" th:each="item:${stu_id11}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id12" th:each="item:${stu_id12}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id13" th:each="item:${stu_id13}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id14" th:each="item:${stu_id14}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id15" th:each="item:${stu_id15}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id21" th:each="item:${stu_id21}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id22" th:each="item:${stu_id22}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id23" th:each="item:${stu_id23}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id24" th:each="item:${stu_id24}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id25" th:each="item:${stu_id25}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id31" th:each="item:${stu_id31}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id32" th:each="item:${stu_id32}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id33" th:each="item:${stu_id33}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id34" th:each="item:${stu_id34}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
									<option class="stu_ids stu_id35" th:each="item:${stu_id35}" th:value="${item}" th:text="${item}" hidden="hidden"></option>
								</select>
							</div>					
						</div>
						<div class="row center-margin-top">
							<div class="col-md-2">
								成&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;绩:
							</div>
							<div class="col-md-4">
								<input id="result" class="form-control" type="text" name="result" th:value="${result}">
							</div>					
						</div>
						<div class="row"><span th:text="${msg}" style="color: red;"></span></div>
					</div>
					<div style="height:40px;display:block;width:362px;margin: 0 auto;margin-top:calc(100vh - 650px);">
						<button type="submit" class="btn btn-primary btn-sm" id="add" name="add">提 交</button>
					</div>
				</div>
				
				<script>
					function jump(){
						window.location.herf="录入成功";
					}
                </script>
            </div>
        </div>
        <div th:replace="base/base::basefooter"></div>

        <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
	</form>
    </body>
</html>
